package com.lnsoft.cac;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.scheduling.annotation.EnableScheduling;


/**
 * IDEA main 执行使用
 * 需要用到lombok插件
 */
@SpringBootApplication
@EnableScheduling
public class Application {
    private static Logger logger = LoggerFactory.getLogger(Application.class);

    public static void main(String[] args) throws Exception{
        // 开启log4j2 异步模式 需要设置systemProperties
        System.setProperty("Log4jContextSelector", "org.apache.logging.log4j.core.async.AsyncLoggerContextSelector");

        ApplicationContext context = SpringApplication.run(Application.class, args);
        logger.debug("spring boot 启动完毕");

    }
}
